CC=gcc
CFLAGS=-Wall

all: producer.c consumer.c head.h
	$(CC) $(CFLAGS) -o producer.o producer.c
	$(CC) $(CFLAGS) -o consumer.o consumer.c -lm

test: producer.c consumer.c head.h
	$(CC) $(CFLAGS) -o producer.o producer.c
	$(CC) $(CFLAGS) -o consumer.o consumer.c -lm
	./producer.o &
	./consumer.o

clean:
	rm -f *.o *~

.PHONY: all test clean
